The invention relates generally to computer operating systems, and deals more particularly with a computer operating system which provides registration of resources for commit procedures to minimize overhead.
This patent application is related to U.S. patent applications:
U.S. patent application Ser. No. 07/525,430, entitled "LOG NAME EXCHANGE FOR RECOVERY OF PROTECTED RESOURCES" filed May 16, 1990 by M. K. Ainsworth et al.; and
U.S. patent application Ser. No. 07/526,471, entitled "OPTIMIZATION OF COMMIT PROCEDURES" filed May 16, 1990 by A. Coleman et al.; and
U.S. patent application Ser. No. 07/525,938, entitled "RECOVERY FACILITY FOR INCOMPLETE SNYC POINTS FOR DISTRIBUTED APPLICATION" filed May 16, 1990 by M. K. Ainsworth et al.; and
U.S. patent application Ser. No. 07/525,427, entitled "COORDINATED SYNC POINT MANAGEMENT OF PROTECTED RESOURCES" filed May 16, 1990 by A. Coleman; and
U.S. patent application Ser. No. 07/525,429, entitled "ASYNCHRONOUS RESYNCHRONIZATION OF A COMMIT PROCEDURE" filed May 16, 1990 by K. Britton; and
U.S. Pat. No. 5,165,031, entitled "COORDINATED HANDLING OF ERROR CODES AND INFORMATION DESCRIBING ERRORS IN A COMMIT PROCEDURE" by E. A. Pruul et al.; and
U.S. patent application Ser. No. 07/525,426, entitled "LOCAL AND GLOBAL COMMIT SCOPES TAILORED TO WORK UNITS" filed May 16, 1990 by B. A. Maslak et al.
The operating system of the present invention can be used in a network of computer systems. Each such computer system can comprise a central, host computer and a multiplicity of virtual machines or other types of execution environments. The host computer for the virtual machines includes a system control program to schedule access by each virtual machine to a data processor of the host, and help to manage the resources of the host, including a large memory, such that each virtual machine appears to be a separate computer. Each virtual machine can also converse with the other virtual machines to send messages or files via the host. Each virtual machine has its own CMS portion of the system control program to interact with (i.e., receive instructions from and provide prompts for) the user of the virtual machine. There may be resources such as shared file system (SFS) and shared SQL relational databases which are accessible by any user virtual machine and the host.
Each such system is considered to be one real machine. It is common to interconnect two or more such real machines in a network, and transfer data via conversations between virtual machines of different real machines. Such a transfer is made via communication facilities such as AVS Gateway and VTAM facilities ("AVS Gateway" and "VTAM" are trademarks of IBM Corp. of Armonk, N.Y.).
An application can change a database or file resource by first making a work request defining the changes. In response, provisional changes according to the work request are made in shadow files while the original database or file is unchanged. At this time, the shadow files are not valid. Then, the application can request that the changes be committed to validate the shadow file changes, and thereby, substitute the shadow file changes for the original file. A one-phase commit procedure can be utilized. The one-phase commit procedure consists of a command to commit the change of the resource as contained in the shadow file. When resources such as SFS or SQL resources are changed, the commits to the resources can be completed in separate one-phase commit procedures. In the vast majority of cases, all resources will be committed in the separate procedures without error or interruption. However, if a problem arises during any one-phase commit procedure some of the separate commits may have completed while others have not, causing inconsistencies. The cost of rebuilding non-critical resources after the problem may be tolerable in view of the efficiency of the one-phase commit procedure.
However, a two-phase commit procedure is required to protect critical resources and critical conversations. For example, assume a first person's checking account is represented in a first database and a second person's savings account is represented in a second database. If the first person writes a check to the second person and the second person deposits the check in his/her savings account, the two-phase commit procedure ensures that if the first person's checking account is debited then the second person's savings account is credited or else neither account is changed. The checking and savings accounts are considered protected, critical resources because it is very important that data transfers involving the checking and savings accounts be handled reliably. An application program can initiate the two-phase commit procedure with a single command, which procedure consists of the following steps, or phases:
(1) During a prepare phase, each participant (debit and credit) resource is polled by the sync point manager to determine if the resource is ready to commit all changes. Each resource promises to complete the resource update if all resources successfully complete the prepare phase i.e. are ready to be updated. PA0 (2) During a commit phase, the sync point manager directs all resources to finalize the updates or back them out if any resource could not complete the prepare phase successfully.
Some means is required in a computer system to determine which resources participate in a commit procedure and to determine what type of commit procedure, one phase or two phase, is appropriate. In the prior art, protected resources have been associated with a special or additional environment to participate in a commit procedure. However, this association has the following disadvantages. The end user, application developer and administrator must consider the additional environment, and the end users must switch from the personal computing environment to the special environment. Also, data is dedicated to the special environment and not readily available to other environments.
In an IBM System 38 prior art system, applications had a verb that could enable or disable commitment control for an application. Thus, an application developer could inadvertently create an application that updates multiple protected resources without using a two-phase commit procedure.
The CICS/VS prior art system distributed a separate module that was included with the application. The module intercepted application program interface requests to a SQL/DS resource manager and registered for the resource manager. Thus, application developers and administrators had to manage a sync point manager module.
A synchronization point design in CICS/VS system requires that a resource manager notify the system through an enable function that the resource manager is active for the application environment. This enabling required an operator interaction with each resource manager at the start of a CICS/VS transaction environment, and is global i.e. for all applications. Applications could not access the resource manager for any resources (protected or not protected) until after the enable function executed.
In CICS/VS systems, the CICS/VS verb to commit or back out changes to protected resources required a preprocess by the CICS/VS system. The application developer needed to execute the preprocess of the entire application before the compile. Thus, an extra step needed to be added to the application development process.
The CICS/VS prior art system supports modification, by a resource adapter, of registration for an application. A resource manager could state whether or not (i.e. suspension) it wanted to participate in a sync point.
The prior art IBM Shared File System (SFS), contained within the prior art IBM VM/SP Release 6 control program, supports only a one-phase commit procedure for only one resource, a shared file system resource. However, the one-phase commit procedure can atomically commit updates to more than one file on the same resource. Also, the SFS system can atomically commit multiple SFS resource managers where no more than one resource manager is in write mode. This is because a one-phase commit procedure is adequate for this case.
The commit scope, known as a CMS work unit, is controlled by the application which defines which files are read and written in any particular work unit. The work unit is limited to a single resource manager. The application may define multiple work units and use them simultaneously, allowing the application to have multiple work scopes. A commit of one work unit has no effect on any other work units.
Another prior art system, SQL/DS system, has support similar to SFS. It allows multiple work units to a single resource manager, but a work unit can access only one resource manager, even for read-only.
A general object of the present invention is to provide an efficient system and process for identification of resources requiring a two-phase commit procedure.
Another general object of the present invention is to minimize the burden on the users of applications, application program developers, resource manager developers, manager developers, system administrators and operators in providing the efficient method for identifying protected resources.
Another general object of the present invention is to minimize overhead in sync point processing.